package hibernate;

import org.hibernate.cfg.Configuration;
import org.hibernate.tool.hbm2ddl.SchemaExport;

public class GerarBanco {
	
	public static void main(String[] args) {
			
		try{
			Configuration cfg = new Configuration();
			cfg.configure();
			
			SchemaExport se = new SchemaExport(cfg);
			se.create(true, true);
			System.out.println("Banco Gerado Com Sucesso!");
		}catch(Exception e){
			e.printStackTrace();
			System.out.println("Erro ao Gerar o Banco!");
		}
		
	}

}
